home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-SIG: World of Games
/
PC-SIG World of Games (CDRM1080710) (1993).iso
/
ENT
/
DISK0001.ZIP
/
WOMBATS.DOC
< prev
next >
Wrap
Text File
|
1986-06-10
|
27KB
|
637 lines
{H} {H} Wombats! {H} {H}
A word-problem generating game
by Michael Potts
the Caspar Institute
1 January 1986
{ version 2.0 }
{ press any key to skip the instructions. }
Wombats was written to help 7 to 11 year-old learners master
word problems and number sentences. Since I expect the program to
engage this audience across as much of their learning spectrum as
possible, vocabulary for the skeletal sentences is at an
appropriate level, precision in capitalization is insisted upon,
and the problems assume a greater mastery of addition and
subtraction than of the two dimensional operations. Wombats
appeals to the audience's love of fantasy and humor, knowing that
instruction by computer can be less than fun.
In the classroom, Wombats attracts and engages most students
for awhile, but some students willingly become repeat players. I
try to extend to them the same consideration I want from programs
I use for my own work and enjoyment: if a learning program, or
any program that I return to again and again, forces me to review
a lengthy set of credits, instructions, and warnings every time I
start it, I get impatient. I'm here to work, computer, so let's
get down to it!
In Wombats, impatience is accommodated. Pressing [Return]
twice in rapid succession gets you past the introduction quickly.
(A third [Return] gets you in trouble. Discerning when one may
safely be impatient, and when one should give a full and
thoughtful answer, is, after all, one of the most important
learnings one may accomplish. When Wombats asks what to call you,
it is best to answer.)
For the patient and curious, Wombats offers instructions:
{H} {H} Wombats! {H} {H}
This program makes up word problems ...with your
help. The computer - that's me - will ask you for names
of people and things to put in the problems it invents.
Before we start, you must tell me the hardest
operation you want. For example, if you choose Subtraction,
the problems will include Addition, too. Next, tell me the
Largest number you want to work with. 99 is a good choice,
but 9 is good for your first game, and 500 is very hard.
(Press [Return] only if you want to use standard settings.)
Finally, I'll ask for the names of five favorite things.
I will reject names of persons or things longer than
16 letters, OR that I think are nonsense. When naming
things, write the word for ONE thing, or I will make up
problems about thingSS! You can press Return at any time,
and I will choose numbers and things for you.
Press any key to read more, or [Esc] to play.
Some people object to personifying the computer by letting
it calls itself "I", humans are, after all, superior to the
products of silicon-based technology, and thus uniquely entitled
to "I" and "me". Theory and in-bred distaste for the pathetic
fallacy aside, children (and almost all other computer users) are
comfortable thinking about computers and other pets as persons of
a possibly limited sort, but persons nonetheless. I want Wombats
to be an enabler, working as a patient, predictable, and
supportive coach to the player, so I endow it with a synthetic
personality in the instructions, which are meant to be read by
the player, not necessarily a teacher.
Instructions like this, printed on paper, are for scholars
or those of us who prefer to see directions on a non-volatile
medium like paper. The on-screen instructions are a middle
ground, for the timid, curious, or forgetful, and we must
remember our audience.
The best way to learn to play a game should be, to play it.
This exhortation is hardly needed by younger players, and the
play of the program should be sufficiently self-explanatory to
help them through the first rounds. The challenge for a
programmer is to anticipate all the possible wrong answers - an
instructive exercise which clearly separates theoreticians from
practical teachers who have seen it all! Programs like Wombats,
which have been through years of classroom testing, acquire deep
layers of error trapping to help the neophyte. These elaborations
of the mainstream of the program may take more time to perfect
than the mainstream itself, and will be used only rarely; for
their users, they can make the difference between enjoyable
learning and frustrated rejection.
How Wombats gets Wombats chooses numbers differently for
problems: addition and subtraction, the one-
a sidetrip for dimensional operations, and multiplication
programmers and division, the two-dimensional. For the former, any number up to and including the
maximum allowed may appear in the top of the
problem. Because we have identified the
audience for this program to be children who
have mastered the one-dimensional operations,
and are mastering the two-dimensional, the
maximum number to appear in multiplication
and division problems, including the result,
will be the specified Largest number; the
operands will be less than or equal to the
square root of the largest number. If, for
example, we had allowed 99 as our largest
number, the program might pose the problem
99 + 99 = ? but would never ask for more than
9 * 9 = ? or 81 / 9 = ? .
{H} {H} Wombats! {H} {H}
Problem control:
hardest Operation:
1=Add 2=Subtract 3=Multiply 4=Divide
your choice ? 4
Largest number in any problem ? 99
5 favorite objects:
1 :>wombat
2 :>plum blossom
3 :>backhoe
4 :>eggplant
5 :>teddy bear
What do I call you? >Damiana
If a player is ready to attempt problems of standard
difficulty - all operations, with numbers as large as 99 - and
will accept the computer's inventory of favorite objects, she may
press [Return] when asked to choose the hardest Operation, and
the entries will be made by the computer, and the player will be
asked for an appellation. Experience shows that children will
frequently "fool" the computer by offering a pseudonym. The
persistance of the computer in calling them anything they choose
is strangely delightful, and a clue to the success of Wombats.
As soon as these parameters are completed, the play begins.
Playing WOMBATS!
The program makes up simple word problems about the
names, things, and numbers you give it as you play. Each
problem consists of two sentences which tell you what to do
with the numbers to get the right answer. Some are tricky!
All you have to do is enter the right answer - that means
Press the numeral keys that make the number, and then
press the Enter key. (The Return key works, too.) Good
players like to press the NumLock key, and use the keypad
for speed. You get credit for being RIGHT, not for
being FAST. Enjoy yourself, and PAY ATTENTION.
If you make a mistake, you can accept help by pressing
Y or can try a problem again by pressing N - but you only
get 3 tries. It is okay to use paper and pencil, but try
not to count on your fingers. Help asks you questions that
make the problem easier to understand.
Good Luck! Press T to read more about Wombats.
Press the Enter key to play.
The game looks like this:
-------------------------{ 1 }---------------------------
Damiana worked for 49 days building door knobs.
When she finished, she had made only 7.
How many days does it take Damiana to make 1 door knob?
Damiana correctly responds by pressing the 7 and the [Enter] or
[Return] keys, and the program responds:
That's RIGHT, Damiana.
1 right answer so far.
----{ press Q to quit - any other key to continue }----
Wombats also for new names from time to time, offering
players an opportunity for hilarity. The computer, however, is
not too easily fooled, as this sample shows:
I need the name of a person. >sienna
The names of persons begin with a capital letter.
Remember the SHIFT key. Please try again.
I need the name of a person. >Sienna
Is Sienna a he or a she? >she
The program counts vowels and rejects names with too few for
its length:
I need the name of a person. >Snnx
I detect nonsense. I don't think "Snnx" is really
someone's name. Please try again.
I need the name of a person. >
Periodically, Wombats also refreshes its object inventory by
asking for something new. This is the opportunity that children
twist to their own ends, entering progressively more outrageous
objects, people, and agencies, in an effort to "test" the
tolerance of the computer:
I need the name of an object.>lawn mower
In due course, a problem about lawn mowers is proposed:
-------------------------{ 4 }---------------------------
Last Monday, Damiana invented a machine that makes lawn
mowers. That day, she made 63 lawn mowers.
The next day, she made 32 more.
How many lawn mowers does she have now?
Suppose Damiana subtracts instead of adding, and answers 31.
The program replies,
-< wrong answer >- Do you want HELP ?
An affirmative answer - press the Y - starts the help dialogue:
...Okay: =============[HELP]=======
What number do you start with? 63
What is the second number? 32
What do you do with these numbers: add, subtract,
multiply, or divide?
Subtract
No. To do this problem, you need to add.
The clue: she made 63, then makes 32 more.
Shouldn't you add?y
So do this problem: 63 + 32 = ?
In this example, Damiana repeated her error, and the
computer showed her the clue that shows this to be an addition
problem.
If the player cannot find the numbers to manipulate, the
program retypes the sentences one at a time. In this example, the
player perseverates in the wrong answer; equally stubbornly, the
computer repeats the first part over again.
...Okay: =============[HELP]=======
What number do you start with? 6
No. Read the first part again carefully:
You and Sienna catch 12 ballet slippers in ballet slipper
traps in the forest.
What number do you start with? 6
No. Read the first part again carefully:
You and Sienna catch 12 ballet slippers in ballet slipper
traps in the forest.
What number do you start with? 12
What is the second number? 12
No. Read the second part again carefully:
You dug 6 traps.
What is the second number? 6
What do you do with these numbers: add, subtract,
multiply, or divide?
Add
No. To do this problem, you need to divide.
You need to know how many each trap caught (as an average),
so you divide 12 into 6 groups. Right?y
So do this problem: 12 / 6 = 3
You need to work on your division FACTS.
The correct answer is 2 .
In this example, the player made every mistake available
(and some of them twice). We might be tempted to suspect the
player of making mistakes just to explore the program. This is a
rarified and valuable kind of learning, to be encouraged.
Another problem reveals a built-in error - it could be called a
bug, but I prefer to call it a feature:
-------------------------{ 10 }---------------------------
This morning, Rochelle looked in her pocket and found 42
butterflys.
Later, she won 33 more in a bet with Damiana. (That's you.)
How many butterflys does she have now?
English pluralizes irregularly, but computers are good at
identical repetition. The simple algorithm for pluralizing is,
add an "s" to the singular; the exceptions are numerous, and
frequently curious. If you can devise an algorithm for correcting
the irregularities, you are invited to "patch" the program. In
the meantime, I rationalize this feature by noting that children
usually spot the computer's error immediately, and are delighted
that it should make such a stupid mistake. The player's mastery
of the concept of irregular pluralization is reinforced. There is
danger, of course, for students who have not mastered the
concept, and accept everything the computer says as gospel.
Garbage In, Gospel Out!
After ten problems (or when the player accepts the
computer's invitation to Quit) an inventory of the last set of
problems is displayed:
Inventory coming!
++++++++++++++++++++++++++++++++++++++++++++++++++++++
rocking chairs : 40 - 2 = 38
lawn mowers : 1 * 1 = 1
umbrellas : 43 - 40 = 3
red flowers : 34 - 20 = 14
red flowers : 31 - 25 = 6 <2111
wombats : 1 * 3 = 3
ballet slippers : 12 / 6 = 2 <4112
mongooses : 1 * 4 = 4
wing nuts : 23 + 0 = 23
butterflys : 42 + 33 = 75
Damiana, you have gotten 8 right, 2 wrong,
for a score of 80%.
If the player is doing well, the computer adds a "WELL DONE" (for
better than 90% correct) and even "Very WELL DONE" (for better
than 95%.) For every problem where Help was accepted and mistakes
were made in deciphering the problem, a diagnostic code - the
last column of four digit numbers - is included.Teacher features
Wombats keeps track of errors made during play, and
prints a diagnostic code with the problems missed. You can
find an explanation of the codes, and recommended remedies
in the book of instructions, TEACHING with an IBM PC.
Diagnostic codes
The units digit and the tens digit reflect the number of
times the player missed the first and second numbers in the
problem (respectively.) For example, in the lengthy example of
Help given two pages previously, the last two digits of the
diagnostic code would be 12, showing that the player
misunderstood the first number in the problem twice, and the
second number once.
The hundreds place reflects errors in the operation that the
player proposes to solve the problem: the numeral represents the
incorrect operation proposed. To refer again to the lengthy Help
dialogue two pages back, the player proposes to add when the
problem requires division; the diagnostic code would show a 1 in
the hundreds place for addition, using the same numeration as in
the program's set-up:
1=Add 2=Subtract 3=Multiply 4=Divide
The thousands place reflects errors in solving the numeric
problem. Again, to take the example, a mistake is made in
division, and so the diagnostic code will show a 4 in the
thousands place, signifying a division error (since the numeric
codes for operations, as noted above, are used here as well.)
The diagnostic code for the example (as can be seen in the
sample Inventory on the previous page) is 4112. As we noted in
the example, a diagnostic code like this may show us that the
student is not ready for this kind of work (in which case most
problems will be followed by full diagnostics), or that her
attention was wandering momentarily, or (most likely) that she
was fooling the computer to see how deeply it was prepared to
help.
When a student's comprehension of concept or operation is
troubled, the diagnostic codes will reflect the trouble. A string
of errors showing a digit in the hundreds place only indicates a
problem with understanding the operation required by word
problems. A string of errors in the thousands place might
indicate a need to polish addition or multiplication facts.
Errors in the less significant digits - the units and tens -
reveals inattention of reading problems.More Teacher Features
If you have a printer, you can make the game more
interesting by turning the printer switch on - see line 8
and the instructions. Then, whenever an inventory of problems
is ready for display, the player will be asked if a print-out
is desired. Players can also print each problem by pressing
P after entering the correct answer.
To make changes in the program, you must attack your
computer's BASIC interpreter, at least in a very minor way. The
"switch" that tells the program whether or not a printer is
connected is in line number 8, which looks like this:
8 PR.SW=0:' printer switch 0 = off 1 = on
As you may remember from the earlier chapter on Controlling
Computers, you may change this line by LISTing it, then moving
the cursor (with the cursor arrows) over the 0, typing a 1, and
pressing [Return]. To make the change permanent, you must
SAVE"WOMBATS onto your disk.
You may want to change Wombats in a number of ways;
you may even want to take out the wombats (Oh, no!). Please
refer to the instructions for help customizing the program.
"If a program is finished, it's obsolete." Like Mrs.
Winchester's famous mystery house, a program is alive only so
long as someone is tinkering with it. This fact is acknowledged
at the mainframe level of computing by the expensive presence of
"hackers" who are constantly tweaking and tuning their machine's
capabilities ...one would hope, to the betterment of its
usefulness (although this is not always the case.) Programs that
provide users with adaptability are much more useful, at any
level, than routines which are unalterable; the most basic lesson
computers are here to teach us is the necessity and delight of
adaptability. Locked programs, which for reasons of security or
profit are unalterable and often uncopyable, teach someone else's
lessons, and in many cases, such lessons are exquisite (as we
discussed earlier in the chapter,) but they can also be prey to
inaccuracy, time, and our love for variety.
Children reflect this in their delight in changing the
objects and persons in the Wombats problems. The teacher who
takes on the role of Program Maintainer, can add to this delight
by changing Wombats's favorite things from time to time. These
are contained in two places. One set are here:
9000 DATA wombat,rocking chair,tractor,dump truck,umbrella
and the other set in these lines:
2730 OB$="apple":GOTO 2900
2740 OB$="peanut":GOTO 2900
2750 OB$="wing nut":GOTO 2900
2760 OB$="ballet slipper":GOTO 2900
2770 OB$="sharp pencil":GOTO 2900
2780 OB$="red flower":GOTO 2900
2790 OB$="wombat":GOTO 2900
2800 OB$="sea urchin":GOTO 2900
2810 OB$="door knob":GOTO 2900
2820 OB$="doll shoe":GOTO 2900
Changes may be accomplished as described above, but Prudent
Programming Practice requires us to maintain a known-to-be-
working version as well as a version under development. Serious
changes in the program are possible, and certainly desirable; the
serious tinkerer should use lots of common sense in planning and
executing these changes. As we have mentioned before, education
should proceed for all across the widest possible spectrum, and
the teacher-maintainer is certainly included: in learning to
program, and to observe the effects on the player-learners of my
efforts, and continually improving the enhancements, continues an
exciting and time-consuming process, in which adding to my own
knowledge has always been the largest component.
Teaching the computer's linear language to follow the
strange and wonderful twists of the English language offers an
opportunity to perfect our understanding of both. The linguistic
format of Wombats's problems is,
S1$: < Person > [ action ] { First number } < Object >[s]
S2$: < P's Gender > [ action ] { Second number }
where the enclosures denote <data provided by the player>, [data
provided by the program], and {data within ranges specified at
the start.} In the simplest case, a problem that reads like this,
S1$:{Damiana}[ needs something special at school today, so]<
she>[ takes along]{ 6}[ ]<rattlesnake>[s.]
S2$:[On the way to school,]< she>[ sees a hat by the road; under
it]< she>[ finds]{ 13}[ more.]
The code that puts those sentences together looks like this:
3020 S1$=P1$+" needs something "
3030 S1$=S1$+"special at school today, so "+SX$+" takes along"
3040 S1$=S1$+STR$(N1)+" "+OB$:IF N1<>1 THEN GOSUB 2600
3050 S1$=S1$+".":S2$="On the way to school, "+SX$+" sees a hat by
the "
3060 S2$=S2$+"road; under it "+SX$+" finds"
3070 S2$=S2$+STR$(N2)+" more.":GOTO 4970
A glossary of the symbols in that section:
symbol what it represents example value
S1$ First sentence of problem [ see ]
S2$ Second sentence [ above ]
These two sentences are
put together by the computer
using the variables below as
building blocks.
P1$ First person Sienna
SX$ Person's gender pronoun she
OB$ the Object in question rattlesnake
These are supplied by the
player as prompted by the
program.
N1 First number 6
N2 Second number 13
Randomly chosen by the
computer within limits set at
the start of the program.
STR$(N1) a string derived by the 6
computer consisting of a space
(or, for a negative number, a
hyphen) and the number or
variable in parentheses.
Each problem also has an associated QUestion, Correct
Answer, and key phrase V$ determining the operation to be used in
solving the problem for use by Help. For this problem, they are
supplied at the start of the addition programs and by the line,
3010 QU$="does "+P1$:V$=SX$+" takes"+STR$(N1)+", then finds"+STR$(N2)
Subroutines: black boxes we need not understand
Repetitive and complicated steps are often hidden in
subroutines or at the beginnings and ends of processes. Two such
external routines are used in this code segment.
GOSUB 2600
GOTO 4970
Pluralizer (a subroutine)
Adds an "s" to a working string T$
Problem poser (end of program generation)
Pops the question and gets the answer.
All problem generators end with GOTO 4970
unless they completely rebuild the question,
in which the GOTO 4980
A rudimentary understanding of BASIC is needed if you want
to decode, change, or augment the addition (starting at line
3000), subtraction (from line 4000), multiplication (from line
5000), or division (line 6000.) As complex and lengthy as it is,
Wombats uses less than a third of the IBM's Basic workspace, and
so there is plenty of room for growth!
Among the division problems are two trick questions, wherein
the trick is that the second number is one less than the divisor
because an additional share is implicitly included in the
problem:
Sienna found a bag with 12 rocking chairs in it.
After school, she shared them with her 3 sisters.
How many rocking chairs does each one have now? 4
-< wrong answer >- Do you want HELP ?
Since these are four to share the windfall - Sienna and her
three sisters - the correct answer is 3.
The code that starts the question, calculates the normal
Correct Answer, and randomly chooses the problem is contained in
line 6000 and 6010. This problem results only when the N
calculated in line 6000 is 1 and the program is sent to line
6020, where the problem itself is generated. Note the way an
extra share of objects is added and the Correct Answer
recalculated in line 6020.
6000 QU$="does each one":CA=N1/N2:N=5*RND(1)+1:' division
6010 ON N GOTO 6020,6090,6140,6200,6240
6020 N1=N1+CA:CA=N1/(N2+1):S1$=P1$+" found a bag with"+STR$(N1)+" "+OB$
6030 IF N1<>1 THEN GOSUB 2600
6040 S1$=S1$+" in it.":S2$="After school, "+SX$+" shared them with "+PS$
6050 S2$=S2$+CHR$(29)+STR$(N2)+" sister":IF N2<>1 THEN GOSUB 2610
6060 V$="each person gets":S2$=S2$+".":N2=N2+1:GOTO 4970
When adding new problems, you need not wait patiently while
the computer comes up with the right combination - which might
take 20 or more problems as the program stands now. Because BASIC
is superbly responsive to minor changes, you can change the line
that chooses the next problem's operation from
500 OP=INT(NL*RND(1)+1):' SUBROUTINES: get operation
to
500 OP=4:'INT(NL*RND(1)+1):' SUBROUTINES: get operation
for example, to test a new division problem. The addition of the
colon and apostrophe tell the interpreter to ignore the rest of
the line. With this change in place, only division problems will
result. To include a new problem, the first of the operation's
lines must be changed as well. To add a sixth division problem,
line 6000 would changed to
6000 QU$="does each one":CA=N1/N2:N=6*RND(1)+1:' division
but to test the problem, we might wish first to change the line to
6000 QU$="does each one":CA=N1/N2:N=6:'*RND(1)+1:' division
so that only the sixth problem will appear. When you are
confident that the new problem is correct and literate, remember
to take the comment marks (the :') out of the program. Otherwise,
the players may complain that they are getting only one problem.
Credit where credit is due:
Send us $5 and your thoughts: the Caspar Institute,
Box 88 / Caspar CA 95420. Please make copies of this
program, but DO NOT remove the sharing information.
By all means, if you correct any bugs or add to the program
significantly, take credit yourself. The credits are in the first
lines of the program, but there is plenty of room for more
credits; use lines 11 - 19. A credit line might look like,
11 ' additional problems added by R. Elkan 10 Jan 86
3897 words
11 January 1986
revised 10 June 1986